<?php
/*******************************************************************************
 * $Date:: Jan 12, 2011 9:39:40 AM                                              $
 * $Revision:                                                                  $
 * $Author:: Tuan Duong                                                        $
 * $Comment::                                                                  $
 ******************************************************************************/ 
/**
 * Description here...
 * 
 * @package Lua
 * @subpackage Builder
 * @author Tuan Duong <bacduong[at]gmail[dot]com>
 * @version 
 */

class Lua_Test_Builder_Dependency
{
    /**
     * @var string
     */
    private $name;
    /**
     * Extra data for create dependent object
     * @var array
     */
    private $extras = array();

    /**
     * @var string
     */
    private $foreignColumn;

    public function __construct($name, $foreignColumn = null, array $extras = array())
    {
        if ($foreignColumn == null) $foreignColumn = 'id';
        $this->setName($name);
        $this->setForeignColumn($foreignColumn);
        $this->setExtras($extras);
    }

    /**
     * @return array the $extras
     */
    public function getExtras()
    {
        return $this->extras;
    }

    /**
     * @param array $extras
     */
    public function setExtras($extras)
    {
        $this->extras = $extras;
    }

    /**
     * Get foreignColumn
     * @return string
     */
    public function getForeignColumn()
    {
        return $this->foreignColumn;
    }

    /**
     * Set foreign column
     * @param string $foreignColumn
     */
    public function setForeignColumn($foreignColumn)
    {
        $this->foreignColumn = $foreignColumn;
    }


    /**
     * @return string the $name
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }
}